import instance from "@/utils/request"

// 获取工资列表
export function getWageList({ page, approvalsTypeChecks, departmentChecks }) {
    return instance.get(`/salarys/list?page=${page}&pageSize=10&&approvalsTypeChecks=${approvalsTypeChecks}&departmentChecks=${departmentChecks}`)
}

// 获取组织架构
export function getOrgList() {
    return instance.get(`/company/department`)
}

// 薪资调整
export function adjustWage(userId, data) {
    return instance.post(`/salarys/modify/${userId}`, data)
}
// 查询薪资
export function getWageDetail(userId) {
    return instance.get(`/salarys/modify/${userId}`)
}
// 定薪
export function setWage(userId, data) {
    console.log(userId, data)
    return instance.post(`/salarys/init/${data.userId}`, data)
}

// 获取报表
export function getReport() {
    return instance.get("/salarys/company-settings")
}